package com.solcoo.json;

public class MerchantSimpleInfoJson implements Comparable<MerchantSimpleInfoJson> {

    /**
     * 是否已经添加该商户
     */
    private boolean attention;

    /**
     * 用户id
     */
    private String userID;

    /**
     * 商户id
     */
    private String merchantId;

    /**
     * 商户名称
     */
    private String merchantName;

    /**
     * 商户头像
     */
    private String merchantAvatarAdr;

    /**
     * 赠送金额
     */
    private double freeAmount;

    /**
     * 商户会员数量
     */
    private Integer memberCount;
    
    // 是否显示抵价券(0不显示，1显示)
    private String ticketFlag;
    
    // 个人坐标与该商户的距离
    private Long distance;
    
    // 商户类型
    private String merchantType;
    
    // 商户经度
    private Double longitude;
    
    // 商户纬度
    private Double latitude;
    
    // 是否显示“抵”
    private Boolean hasDi;
    
    // 是否显示“惠”
    private Boolean hasHui;
    
    // 是否显示“卡”
    private Boolean hasKa;

    public Boolean getHasDi() {
		return hasDi;
	}

	public void setHasDi(Boolean hasDi) {
		this.hasDi = hasDi;
	}

	public Boolean getHasHui() {
		return hasHui;
	}

	public void setHasHui(Boolean hasHui) {
		this.hasHui = hasHui;
	}

	public Boolean getHasKa() {
		return hasKa;
	}

	public void setHasKa(Boolean hasKa) {
		this.hasKa = hasKa;
	}

	public Double getLongitude() {
		return longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public String getMerchantType() {
		return merchantType==null?"":merchantType;
	}

	public void setMerchantType(String merchantType) {
		this.merchantType = merchantType;
	}

	public Long getDistance() {
		return distance;
	}

	public void setDistance(Long distance) {
		this.distance = distance;
	}

	public String getTicketFlag() {
		return ticketFlag;
	}

	public void setTicketFlag(String ticketFlag) {
		this.ticketFlag = ticketFlag;
	}

	public boolean isAttention() {
        return attention;
    }

    public void setAttention(boolean attention) {
        this.attention = attention;
    }

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getMerchantAvatarAdr() {
        return merchantAvatarAdr;
    }

    public void setMerchantAvatarAdr(String merchantAvatarAdr) {
        this.merchantAvatarAdr = merchantAvatarAdr;
    }

    public Integer getMemberCount() {
        if(this.memberCount == null) {
            return 0;
        }
        return memberCount;
    }

    public void setMemberCount(Integer memberCount) {
        if(memberCount == null) {
            this.memberCount = 0;
        }
        this.memberCount = memberCount;
    }

    public double getFreeAmount() {
        return freeAmount;
    }

    public void setFreeAmount(double freeAmount) {
        this.freeAmount = freeAmount;
    }

	@Override
	public int compareTo(MerchantSimpleInfoJson ms) {
		if(ms.distance == null) {
			return -1;
		}
		if(this.distance==null || this.distance>ms.distance) {
			return 1;
		}
		if(this.distance < ms.distance) {
			return -1;
		}
		return 0;
	}


}
